import request from "../axios/request";

// function getAuditRecordAndAssignTaskByHistoryId(processHistoryId) {
//     return new Promise((resolve, reject) => {
//         request("get", "/auditRecord/getAuditRecordAndAssignTaskByHistoryId", {processHistoryId})
//             .then(r => {
//                 resolve(r);
//             }, e => {
//                 reject(e);
//             })
//     });
// }

function getAuditRecordAndAssignTaskByRecordTaskId(recordTaskId) {
    return new Promise((resolve, reject) => {
        request("get", "/auditRecord/getAuditRecordAndAssignTaskByRecordTaskId", {recordTaskId})
            .then(r => {
                resolve(r);
            }, e => {
                reject(e);
            })
    });
}

function auditRecord(auditResult) {
    return new Promise((resolve, reject) => {
        request("post", "/auditRecord/auditRecord", auditResult)
            .then(r => {
                resolve(r);
            }, e => {
                reject(e);
            })
    });
}

export {getAuditRecordAndAssignTaskByRecordTaskId,auditRecord};